<?php

$query = $_SESSION['manager']->getSelectedPlayers();
$goalkeeper = mysql_result($query, 0, "goalkeeper");
$rightback = mysql_result($query, 0, "rightback");
$rightcenter = mysql_result($query, 0, "rightcenter");
$leftcenter = mysql_result($query, 0, "leftcenter");
$leftback = mysql_result($query, 0, "leftback");
$rightwing = mysql_result($query, 0, "rightwing");
$rightcenterhalf = mysql_result($query, 0, "rightcenterhalf");
$leftcenterhalf = mysql_result($query, 0, "leftcenterhalf");
$leftwing = mysql_result($query, 0, "leftwing");
$rightstriker = mysql_result($query, 0, "rightstriker");
$leftstriker = mysql_result($query, 0, "leftstriker");

$dbconnect = DBconnect::getInstance();

$goalkeeperTeamName = $dbconnect->getRealPlayerTeamName($goalkeeper);
$goalkeeperImageSRC = "../images/teamkits/GK".$goalkeeperTeamName.".png";
$goalkeeperValue = $dbconnect->getRealPlayerValue($goalkeeper);
$goalkeeperName = $dbconnect->getRealPlayerName($goalkeeper);
if(strpos($goalkeeperName, " ")){
	$goalkeeperName = trim(strstr($goalkeeperName, " "));
}

$rightbackTeamName = $dbconnect->getRealPlayerTeamName($rightback);
$rightbackImageSRC = "../images/teamkits/".$rightbackTeamName.".png";
$rightbackValue = $dbconnect->getRealPlayerValue($rightback);
$rightbackName = $dbconnect->getRealPlayerName($rightback);
if(strpos($rightbackName, " ")){
	$rightbackName = trim(strstr($rightbackName, " "));
}

$rightcenterTeamName = $dbconnect->getRealPlayerTeamName($rightcenter);
$rightcenterImageSRC = "../images/teamkits/".$rightcenterTeamName.".png";
$rightcenterValue = $dbconnect->getRealPlayerValue($rightcenter);
$rightcenterName = $dbconnect->getRealPlayerName($rightcenter);
if(strpos($rightcenterName, " ")){
	$rightcenterName = trim(strstr($rightcenterName, " "));
}

$leftcenterTeamName = $dbconnect->getRealPlayerTeamName($leftcenter);
$leftcenterImageSRC = "../images/teamkits/".$leftcenterTeamName.".png";
$leftcenterValue = $dbconnect->getRealPlayerValue($leftcenter);
$leftcenterName = $dbconnect->getRealPlayerName($leftcenter);
if(strpos($leftcenterName, " ")){
	$leftcenterName = trim(strstr($leftcenterName, " "));
}

$leftbackTeamName = $dbconnect->getRealPlayerTeamName($leftback);
$leftbackImageSRC = "../images/teamkits/".$leftbackTeamName.".png";
$leftbackValue = $dbconnect->getRealPlayerValue($leftback);
$leftbackName = $dbconnect->getRealPlayerName($leftback);
if(strpos($leftbackName, " ")){
	$leftbackName = trim(strstr($leftbackName, " "));
}

$rightwingTeamName = $dbconnect->getRealPlayerTeamName($rightwing);
$rightwingImageSRC = "../images/teamkits/".$rightwingTeamName.".png";
$rightwingValue = $dbconnect->getRealPlayerValue($rightwing);
$rightwingName = $dbconnect->getRealPlayerName($rightwing);
if(strpos($rightwingName, " ")){
	$rightwingName = trim(strstr($rightwingName, " "));
}

$rightcenterhalfTeamName = $dbconnect->getRealPlayerTeamName($rightcenterhalf);
$rightcenterhalfImageSRC = "../images/teamkits/".$rightcenterhalfTeamName.".png";
$rightcenterhalfValue = $dbconnect->getRealPlayerValue($rightcenterhalf);
$rightcenterhalfName = $dbconnect->getRealPlayerName($rightcenterhalf);
if(strpos($rightcenterhalfName, " ")){
	$rightcenterhalfName = trim(strstr($rightcenterhalfName, " "));
}

$leftcenterhalfTeamName = $dbconnect->getRealPlayerTeamName($leftcenterhalf);
$leftcenterhalfImageSRC = "../images/teamkits/".$leftcenterhalfTeamName.".png";
$leftcenterhalfValue = $dbconnect->getRealPlayerValue($leftcenterhalf);
$leftcenterhalfName = $dbconnect->getRealPlayerName($leftcenterhalf);
if(strpos($leftcenterhalfName, " ")){
	$leftcenterhalfName = trim(strstr($leftcenterhalfName, " "));
}

$leftwingTeamName = $dbconnect->getRealPlayerTeamName($leftwing);
$leftwingImageSRC = "../images/teamkits/".$leftwingTeamName.".png";
$leftwingValue = $dbconnect->getRealPlayerValue($leftwing);
$leftwingName = $dbconnect->getRealPlayerName($leftwing);
if(strpos($leftwingName, " ")){
	$leftwingName = trim(strstr($leftwingName, " "));
}

$rightstrikerTeamName = $dbconnect->getRealPlayerTeamName($rightstriker);
$rightstrikerImageSRC = "../images/teamkits/".$rightstrikerTeamName.".png";
$rightstrikerValue = $dbconnect->getRealPlayerValue($rightstriker);
$rightstrikerName = $dbconnect->getRealPlayerName($rightstriker);
if(strpos($rightstrikerName, " ")){
	$rightstrikerName = trim(strstr($rightstrikerName, " "));
}

$leftstrikerTeamName = $dbconnect->getRealPlayerTeamName($leftstriker);
$leftstrikerImageSRC = "../images/teamkits/".$leftstrikerTeamName.".png";
$leftstrikerValue = $dbconnect->getRealPlayerValue($leftstriker);
$leftstrikerName = $dbconnect->getRealPlayerName($leftstriker);
if(strpos($leftstrikerName, " ")){
	$leftstrikerName = trim(strstr($leftstrikerName, " "));
}

?>